package com.learn.run;

import com.learn.beans.DemoBean;
import com.learn.config.ProfileConfig;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @Author:Mark
 * @Description:
 * @Date: Created on 10:49 2018-11-13
 * @Modify by:
 */
public class RunPorfile {

  public static void main(String[] args) {
    AnnotationConfigApplicationContext context=new AnnotationConfigApplicationContext();
    context.getEnvironment().setActiveProfiles("pro");
    context.register(ProfileConfig.class);
    context.refresh();

    DemoBean demoBean = context.getBean(DemoBean.class);
    System.out.println(demoBean.getContent()+"===============");

  }

}
